package com.wicket.okrcalc.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcalc.biz.service.EvaCalcService;
import com.wicket.okrcalc.biz.service.dto.req.*;
import com.wicket.okrcalc.biz.service.dto.res.*;
import com.wicket.okrcalc.common.ro.OkrResult;
import com.wicket.okrcalc.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/calc/evaCalc/")
public class EvaCalcController {

  @Autowired
  EvaCalcService evaCalcService;
/**
   * D4规划树执行计算公式(公共)
   */
    @PostMapping("implementPlanTreeExecutesCalcFormulaCom")
    public OkrResult<ImplementPlanTreeExecutesCalcFormulaComRespDto> implementPlanTreeExecutesCalcFormulaCom(@RequestBody @Validated ImplementPlanTreeExecutesCalcFormulaComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementPlanTreeExecutesCalcFormulaCom(reqDTO));
    }
/**
   * D4执行分段查询目标父周期(公共)
   */
    @PostMapping("implementSegQueryTargetCycleCom")
    public OkrResult<ImplementSegQueryTargetCycleComRespDto> implementSegQueryTargetCycleCom(@RequestBody @Validated ImplementSegQueryTargetCycleComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementSegQueryTargetCycleCom(reqDTO));
    }
/**
   * D4查询标准数据(开始时间小于结束时间大于等于)详情
   */
    @PostMapping("queryStandardDataStartLessEndBigEqualDetailCom")
    public OkrResult<QueryStandardDataStartLessEndBigEqualDetailComRespDto> queryStandardDataStartLessEndBigEqualDetailCom(@RequestBody @Validated QueryStandardDataStartLessEndBigEqualDetailComReqDto reqDTO){
    return OkrResult.success(evaCalcService.queryStandardDataStartLessEndBigEqualDetailCom(reqDTO));
    }
/**
   * D4分析历史与当前工作周期标准数据(公共)
   */
    @PostMapping("analysisHistoryAndCurWorkCycleStandDardCom")
    public OkrResult<AnalysisHistoryAndCurWorkCycleStandDardComRespDto> analysisHistoryAndCurWorkCycleStandDardCom(@RequestBody @Validated AnalysisHistoryAndCurWorkCycleStandDardComReqDto reqDTO){
    return OkrResult.success(evaCalcService.analysisHistoryAndCurWorkCycleStandDardCom(reqDTO));
    }
/**
   * D4分析历史与当前更新周期(公共)
   */
    @PostMapping("analysisHistoryAndCurUpdateCycleCom")
    public OkrResult<AnalysisHistoryAndCurUpdateCycleComRespDto> analysisHistoryAndCurUpdateCycleCom(@RequestBody @Validated AnalysisHistoryAndCurUpdateCycleComReqDto reqDTO){
    return OkrResult.success(evaCalcService.analysisHistoryAndCurUpdateCycleCom(reqDTO));
    }
/**
   * D4执行修正进度值/实际值/费用金额(公共)
   */
    @PostMapping("implementAdjustedProgressActualCostAmountCom")
    public OkrResult<ImplementAdjustedProgressActualCostAmountComRespDto> implementAdjustedProgressActualCostAmountCom(@RequestBody @Validated ImplementAdjustedProgressActualCostAmountComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementAdjustedProgressActualCostAmountCom(reqDTO));
    }
/**
   * D4分析数据点计算场景(公共)
   */
    @PostMapping("analysisDataTypeCalcSceneCom")
    public OkrResult<AnalysisDataTypeCalcSceneComRespDto> analysisDataTypeCalcSceneCom(@RequestBody @Validated AnalysisDataTypeCalcSceneComReqDto reqDTO){
    return OkrResult.success(evaCalcService.analysisDataTypeCalcSceneCom(reqDTO));
    }
/**
   * D4执行检测汇报进度值(公共)
   */
    @PostMapping("implementCheckReportProgressValueCom")
    public OkrResult<ImplementCheckReportProgressValueComRespDto> implementCheckReportProgressValueCom(@RequestBody @Validated ImplementCheckReportProgressValueComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementCheckReportProgressValueCom(reqDTO));
    }
/**
   * D4分析增财务父子中类型(公共)
   */
    @PostMapping("analysisAddFinaceParentSubMidCycleTypeCom")
    public OkrResult<AnalysisAddFinaceParentSubMidCycleTypeComRespDto> analysisAddFinaceParentSubMidCycleTypeCom(@RequestBody @Validated AnalysisAddFinaceParentSubMidCycleTypeComReqDto reqDTO){
    return OkrResult.success(evaCalcService.analysisAddFinaceParentSubMidCycleTypeCom(reqDTO));
    }
/**
   * D4查询被评对象目标周期详情(跨)
   */
    @PostMapping("queryEvaObjTargetCycleOverDetailCom")
    public OkrResult<QueryEvaObjTargetCycleOverDetailComRespDto> queryEvaObjTargetCycleOverDetailCom(@RequestBody @Validated QueryEvaObjTargetCycleOverDetailComReqDto reqDTO){
    return OkrResult.success(evaCalcService.queryEvaObjTargetCycleOverDetailCom(reqDTO));
    }
/**
   * D4计算因子达成度转得分(公共)
   */
    @PostMapping("calculateFactorReachToScoreCom")
    public OkrResult<CalculateFactorReachToScoreComRespDto> calculateFactorReachToScoreCom(@RequestBody @Validated CalculateFactorReachToScoreComReqDto reqDTO){
    return OkrResult.success(evaCalcService.calculateFactorReachToScoreCom(reqDTO));
    }
/**
   * D4执行修正填报标准数据是否最新(公共)
   */
    @PostMapping("implementAdjustedFillInStandardDataIsNewestCom")
    public OkrResult<ImplementAdjustedFillInStandardDataIsNewestComRespDto> implementAdjustedFillInStandardDataIsNewestCom(@RequestBody @Validated ImplementAdjustedFillInStandardDataIsNewestComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementAdjustedFillInStandardDataIsNewestCom(reqDTO));
    }
/**
   * D4执行修正并计算目标标准数据(公共)
   */
    @PostMapping("implementAdjustedAndCalcTargetStandardDataCom")
    public OkrResult<ImplementAdjustedAndCalcTargetStandardDataComRespDto> implementAdjustedAndCalcTargetStandardDataCom(@RequestBody @Validated ImplementAdjustedAndCalcTargetStandardDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementAdjustedAndCalcTargetStandardDataCom(reqDTO));
    }
/**
   * D4执行删标准数据(公共)
   */
    @PostMapping("implementDelStandardDataCom")
    public OkrResult<ImplementDelStandardDataComRespDto> implementDelStandardDataCom(@RequestBody @Validated ImplementDelStandardDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementDelStandardDataCom(reqDTO));
    }
/**
   * D4非末级周期向左克隆标准数据(公共)
   */
    @PostMapping("implementNonFinalCycleLeftCloneStandardDataCom")
    public OkrResult<ImplementNonFinalCycleLeftCloneStandardDataComRespDto> implementNonFinalCycleLeftCloneStandardDataCom(@RequestBody @Validated ImplementNonFinalCycleLeftCloneStandardDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementNonFinalCycleLeftCloneStandardDataCom(reqDTO));
    }
/**
   * D4判断当前周期是否存在标准数据(公共)
   */
    @PostMapping("judgeCurCycleIsHaveDataCom")
    public OkrResult<JudgeCurCycleIsHaveDataComRespDto> judgeCurCycleIsHaveDataCom(@RequestBody @Validated JudgeCurCycleIsHaveDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.judgeCurCycleIsHaveDataCom(reqDTO));
    }
/**
   * D4查询标准数据by小于等于开始时间大于等于结束时间详情(公共)
   */
    @PostMapping("queryStandardDataBySmallStartAndBigEndDetailCom")
    public OkrResult<QueryStandardDataBySmallStartAndBigEndDetailComRespDto> queryStandardDataBySmallStartAndBigEndDetailCom(@RequestBody @Validated QueryStandardDataBySmallStartAndBigEndDetailComReqDto reqDTO){
    return OkrResult.success(evaCalcService.queryStandardDataBySmallStartAndBigEndDetailCom(reqDTO));
    }
/**
   * D4执行当前内容或兄弟计算修订异常场景(公共)
   */
    @PostMapping("implementCurConBrotherCalcReviseAnormalSceneCom")
    public OkrResult<ImplementCurConBrotherCalcReviseAnormalSceneComRespDto> implementCurConBrotherCalcReviseAnormalSceneCom(@RequestBody @Validated ImplementCurConBrotherCalcReviseAnormalSceneComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementCurConBrotherCalcReviseAnormalSceneCom(reqDTO));
    }
/**
   * D4执行父级内容向上计算(公共)
   */
    @PostMapping("implementParentConUpCalcCom")
    public OkrResult<ImplementParentConUpCalcComRespDto> implementParentConUpCalcCom(@RequestBody @Validated ImplementParentConUpCalcComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementParentConUpCalcCom(reqDTO));
    }
/**
   * D4执行循环计算不同周期标准数据异常或修订场景(公共)
   */
    @PostMapping("implementLoopCalcCyclesStandardDataCom")
    public OkrResult<ImplementLoopCalcCyclesStandardDataComRespDto> implementLoopCalcCyclesStandardDataCom(@RequestBody @Validated ImplementLoopCalcCyclesStandardDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementLoopCalcCyclesStandardDataCom(reqDTO));
    }
/**
   * D4分析数据计算正常与异常场景(公共)
   */
    @PostMapping("analysisDataCalcNormalAndAmSceneCom")
    public OkrResult<AnalysisDataCalcNormalAndAmSceneComRespDto> analysisDataCalcNormalAndAmSceneCom(@RequestBody @Validated AnalysisDataCalcNormalAndAmSceneComReqDto reqDTO){
    return OkrResult.success(evaCalcService.analysisDataCalcNormalAndAmSceneCom(reqDTO));
    }
/**
   * D4执行计算克隆向右非末级周期标准数据(公共)
   */
    @PostMapping("implementCalcCurRightCycleStandardDataCom")
    public OkrResult<ImplementCalcCurRightCycleStandardDataComRespDto> implementCalcCurRightCycleStandardDataCom(@RequestBody @Validated ImplementCalcCurRightCycleStandardDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementCalcCurRightCycleStandardDataCom(reqDTO));
    }
/**
   * D4执行MQ计算当前或祖先规划目标标准数据(公共)
   */
    @PostMapping("implementCalcCurOrParentTargetDataCom")
    public OkrResult<ImplementCalcCurOrParentTargetDataComRespDto> implementCalcCurOrParentTargetDataCom(@RequestBody @Validated ImplementCalcCurOrParentTargetDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementCalcCurOrParentTargetDataCom(reqDTO));
    }
/**
   * D4执行MQ计算当前及祖先规划目标标准数据(公共)
   */
    @PostMapping("implementCalcCurAndParentTargetDataCom")
    public OkrResult<ImplementCalcCurAndParentTargetDataComRespDto> implementCalcCurAndParentTargetDataCom(@RequestBody @Validated ImplementCalcCurAndParentTargetDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementCalcCurAndParentTargetDataCom(reqDTO));
    }
/**
   * D4执行MQ循环计算规划目标数据异常或修订场景(公共)
   */
    @PostMapping("implementLoopCalcCyclesTargetDataCom")
    public OkrResult<ImplementLoopCalcCyclesTargetDataComRespDto> implementLoopCalcCyclesTargetDataCom(@RequestBody @Validated ImplementLoopCalcCyclesTargetDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementLoopCalcCyclesTargetDataCom(reqDTO));
    }
/**
   * D4执行MQ计算当前或兄弟内容异常场景(公共)
   */
    @PostMapping("implementCalcCurOrBrothersTargetDataCom")
    public OkrResult<ImplementCalcCurOrBrothersTargetDataComRespDto> implementCalcCurOrBrothersTargetDataCom(@RequestBody @Validated ImplementCalcCurOrBrothersTargetDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementCalcCurOrBrothersTargetDataCom(reqDTO));
    }
/**
   * D4执行MQ计算父级内容向上规划目标数据(公共)
   */
    @PostMapping("implementCalcParentTargetDataCom")
    public OkrResult<ImplementCalcParentTargetDataComRespDto> implementCalcParentTargetDataCom(@RequestBody @Validated ImplementCalcParentTargetDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementCalcParentTargetDataCom(reqDTO));
    }
/**
   * D4新增规划目标MQ队列数据(公共)
   */
    @PostMapping("addPlanTargetMqQueueCom")
    public OkrResult<AddPlanTargetMqQueueComRespDto> addPlanTargetMqQueueCom(@RequestBody @Validated AddPlanTargetMqQueueComReqDto reqDTO){
    return OkrResult.success(evaCalcService.addPlanTargetMqQueueCom(reqDTO));
    }
/**
   * D4新增规划财务MQ队列数据(公共)
   */
    @PostMapping("addPlanFinanceMqQueueCom")
    public OkrResult<AddPlanFinanceMqQueueComRespDto> addPlanFinanceMqQueueCom(@RequestBody @Validated AddPlanFinanceMqQueueComReqDto reqDTO){
    return OkrResult.success(evaCalcService.addPlanFinanceMqQueueCom(reqDTO));
    }
/**
   * D4查询规划目标MQ队列数据列表(公共)
   */
    @PostMapping("queryPlanTargetMqQueueListCom")
    public OkrResult<QueryPlanTargetMqQueueListComRespDto> queryPlanTargetMqQueueListCom(@RequestBody @Validated QueryPlanTargetMqQueueListComReqDto reqDTO){
    return OkrResult.success(evaCalcService.queryPlanTargetMqQueueListCom(reqDTO));
    }
/**
   * D4查询规划财务MQ队列数据列表(公共)
   */
    @PostMapping("queryPlanFinanceMqQueueListCom")
    public OkrResult<QueryPlanFinanceMqQueueListComRespDto> queryPlanFinanceMqQueueListCom(@RequestBody @Validated QueryPlanFinanceMqQueueListComReqDto reqDTO){
    return OkrResult.success(evaCalcService.queryPlanFinanceMqQueueListCom(reqDTO));
    }
/**
   * D4新增规划目标MQ-Redis队列数据(公共)
   */
    @PostMapping("addPlanTargetMqRedisQueueCom")
    public OkrResult<AddPlanTargetMqRedisQueueComRespDto> addPlanTargetMqRedisQueueCom(@RequestBody @Validated AddPlanTargetMqRedisQueueComReqDto reqDTO){
    return OkrResult.success(evaCalcService.addPlanTargetMqRedisQueueCom(reqDTO));
    }
/**
   * D4新增规划财务MQ-Redis队列数据(公共)
   */
    @PostMapping("addFinancialPlannMqRedisQueueCom")
    public OkrResult<AddFinancialPlannMqRedisQueueComRespDto> addFinancialPlannMqRedisQueueCom(@RequestBody @Validated AddFinancialPlannMqRedisQueueComReqDto reqDTO){
    return OkrResult.success(evaCalcService.addFinancialPlannMqRedisQueueCom(reqDTO));
    }
}
